package com.mycompany;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.wicket.PageParameters;
import org.apache.wicket.RequestCycle;
import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.OnChangeAjaxBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBoxMultipleChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.protocol.http.WebRequestCycle;
import org.apache.wicket.util.string.Strings;

public class AssignTeamPage extends WebPage{
	
	private static ArrayList MANY_CHOICES = (ArrayList) Person.getManagers(); 
	private ArrayList aList = new ArrayList();
    
    
	
	public void doAssignTeamPage(Person employee) {
        PropertyModel messageModel = new PropertyModel(this, "aList");

        add(new Label("msg", messageModel));
        
        final Label label = new Label("pageTitle", new Model("Assign Team"));
        label.setOutputMarkupId(true);
        add(label); 
        
		final Form form = new Form("form");
		add(form);
		form.add(new Label("label", new PropertyModel(employee, "name")));
		
		DropDownWithCheckBoxes test_DDWCB = new DropDownWithCheckBoxes("DDWCB",new Model<String>("select test"),new Model<String>("grey_drop_button_over.gif"),label,MANY_CHOICES);
		form.add(test_DDWCB);
	}
	
	public AssignTeamPage(PageParameters pars) {
		Person myPerson = new Person(pars.getAsLong("id",new Long(0)),pars.getString("name"),null,aList);
		doAssignTeamPage(myPerson);
	}
}
